<template>
	<div style="background: #f5f5f5;">
		<vhead></vhead>
		<div class="container" style="margin-top: 50px;">
			<div class="row">
				<div class="col-sm-9">
					<ol class="breadcrumb">
				      	<li>
				      		<router-link to="/home">首页</router-link>
				      	</li> 
				      	<li>
				      		<router-link to="/life">生活琐事</router-link>
				      	</li> 
				      	<li class="active">『{{lifeJson.lifeTitle}}』</li>
				    </ol>
				    <div class="col-sm-12 col-xs-12" style="background: rgb(255, 255, 255);">
				    	<h3 class="text-center">{{lifeJson.lifeTitle}}</h3> 
				    	<p class="text-center">作者：{{lifeJson.updater}} 上传时间:{{lifeJson.updateDate}}</p> 
				    	<p v-html="lifeJson.lifeContent"></p>
				    </div>
				</div>
			</div>
		</div>
		<vfoot></vfoot>
	</div>
</template>

<script>
	import Vhead from "../public/VHead"
	import VFoot from "../public/VFoot"
	import Qs from 'qs'
	export default {
		data () {
		    return {
		    	lifeJson : [],
		    }
		},
		mounted ($route) {
	 		this.$nextTick(()=>{
	 			let _this = this;
	 			
	 			//获取书籍的ID
	 			let lifeId = {
  					"lifeId":_this.$route.params.id,
  				}
	 			
	 			//获取指定的书籍
	 			_this.$axios({
	  				method:"post",
	  				data:Qs.stringify(lifeId),
	  				url:"../public/index.php/index/Life/findLifeById",
	  			}).then(function(result){
					_this.lifeJson = result.data;
	  			});
	  			
	  			
	  			
	 		})
 		},
		components:{
			"vhead" : Vhead,
			"vfoot" : VFoot,
		},
		methods : {
			
		}
	}
</script>

<style scoped>
	
	
</style>